#define _CRT_SECURE_NO_WARNINGS 1
#include"list.h"
#include"reverse_iterator.h"
#include<iostream>
using namespace hxs;

void testList1()
{
	list<int> lt;
	lt.push_back(1);
	lt.push_back(2);
	lt.push_back(3);
	lt.push_back(4);
}

void testList2()
{
	list<int> lt;
	lt.push_back(1);
	lt.push_back(2);
	lt.push_back(3);
	lt.push_back(4);

	list<int>::iterator it=lt.begin();

	while (it != lt.end())
	{
		*it *= 2;

		++it;
	}

	for (auto e: lt)
	{
		std::cout << e << std::endl;
	}
}

void testList3()
{
	list<int> lt;
	lt.push_back(1);
	lt.push_back(2);
	lt.push_back(3);
	lt.push_back(4);

	lt.pop_back();

	for (auto e : lt)
	{
		std::cout << e << std::endl;
	}
}

void testList4()
{
	list<int> lt;
	lt.push_back(1);
	lt.push_back(2);
	lt.push_back(3);
	lt.push_back(4);

	list<int> lt2(lt.begin(), lt.end());
	list<int> lt3(lt2);
	list<int> lt4;

	lt4 = lt2;

	lt4.clear();


	for (auto e : lt4)
	{
		std::cout << e << std::endl;
	}

}

int main()
{

	testList4();

	return 0;
}